using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BookInfoCS
{
    public class BookBuilder : System.Web.UI.ControlBuilder
    {
        public override bool HtmlDecodeLiterals()
        {
            return true;
        }

        public override bool AllowWhitespaceLiterals()
        {
            return false;
        }

        public override void AppendLiteralString(string s)
        {
        }
        public override System.Type GetChildControlType(string tagName,
                                           System.Collections.IDictionary attribs)
        {
            switch (tagName)
            {
                case "Author":
                    return typeof(Author);
                case "Titles":
                    return typeof(Titles);
                case "Description":
                    return typeof(Description);
                case "asp:Label":
                    return typeof(Label);
                    break;
                default:
                    throw new Exception("Tag " + tagName + " not allowed in this control.");
            };

        }
    }
}
